import os
class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def printMsg(self):
        print("name " + self.name + " age = "+ str(self.age))

    def readtxt(self):
        with open("111.txt", "r", encoding="UTF-8") as f:
            for x in f:
                print(x)

    
p = Person("ZHANGSAN", 3)
print(p.name)
print(p.age)
p.printMsg()
p.readtxt()